package yyy.ab.common.enums;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import yyy.ab.common.core.BaseEnum;

/**
 * 删除状态
 */
public enum DeleteStatus implements BaseEnum {

    // 删除状态
    INITIAL("0"), DELETED("1");

    private final String value;

    DeleteStatus(String status) {
        this.value = status;
    }

    @JsonCreator
    public static DeleteStatus get(String value) {
        for (DeleteStatus d : values()) {
            if (d.toString().equals(value)) {
                return d;
            }
        }
        return null;
    }

    @JsonValue
    public String getValue() {
        return this.value;
    }

    public String toString() {
        return this.value;
    }
}
